// 在线用户路由
import { Router } from 'express';
import onlineController from '@/controllers/monitor/online.controller';
import { authMiddleware } from '@/middlewares/auth.middleware';
import { permissionMiddleware } from '@/middlewares/permission.middleware';

const router = Router();

/**
 * 在线用户监控路由
 * 路径前缀：/monitor/online
 */

// ================== 在线用户相关 ==================

// 所有路由均需要认证
router.use(authMiddleware);

// 查询在线用户列表
router.get('/list', permissionMiddleware('monitor:online:list'), onlineController.list);

// 强制退出用户
router.delete('/:tokenId', permissionMiddleware('monitor:online:forceLogout'), onlineController.forceLogout);

export default router; 